/*
 * Helper structures for fuse-requests
 */
#pragma once

#include "../../viofs/shared/fuse.h"

typedef struct fuse_in_header   FUSE_IN_HEADER, *PFUSE_IN_HEADER;
typedef struct fuse_out_header  FUSE_OUT_HEADER, *PFUSE_OUT_HEADER;
typedef struct fuse_entry_out   FUSE_ENTRY_OUT, *PFUSE_ENTRY_OUT;

typedef struct fuse_attr FUSE_ATTR, *PFUSE_ATTR;

typedef struct _FUSE_INIT_IN {
    struct fuse_in_header   hdr;
    struct fuse_init_in     init;
} FUSE_INIT_IN, *PFUSE_INIT_IN;

typedef struct _FUSE_INIT_OUT {
    struct fuse_out_header  hdr;
    struct fuse_init_out    init;
} FUSE_INIT_OUT, *PFUSE_INIT_OUT;

typedef struct _FUSE_LOOKUP_OUT {
    struct fuse_out_header  hdr;
    struct fuse_entry_out   entry;
} FUSE_LOOKUP_OUT, *PFUSE_LOOKUP_OUT;

typedef struct _FUSE_GETATTR_IN {
    struct fuse_in_header   hdr;
    struct fuse_getattr_in  getattr;
} FUSE_GETATTR_IN, *PFUSE_GETATTR_IN;

typedef struct _FUSE_GETATTR_OUT {
    struct fuse_out_header   hdr;
    struct fuse_attr_out     attr;
} FUSE_GETATTR_OUT, *PFUSE_GETATTR_OUT;

typedef struct _FUSE_SETATTR_IN {
    struct fuse_in_header   hdr;
    struct fuse_setattr_in  setattr;
} FUSE_SETATTR_IN, *PFUSE_SETATTR_IN;

typedef struct _FUSE_SETATTR_OUT {
    struct fuse_out_header   hdr;
    struct fuse_attr_out     attr;
} FUSE_SETATTR_OUT, *PFUSE_SETATTR_OUT;

typedef struct _FUSE_STATFS_OUT {
    struct fuse_out_header   hdr;
    struct fuse_statfs_out   statfs;
} FUSE_STATFS_OUT, * PFUSE_STATFS_OUT;

typedef struct _FUSE_CREATE_IN {
    struct fuse_in_header   hdr;
    struct fuse_create_in   create;
} FUSE_CREATE_IN, * PFUSE_CREATE_IN;

typedef struct _FUSE_CREATE_OUT {
    struct fuse_out_header  hdr;
    struct fuse_entry_out   entry;
    struct fuse_open_out    open;
} FUSE_CREATE_OUT, * PFUSE_CREATE_OUT;

typedef struct _FUSE_OPEN_IN {
    struct fuse_in_header   hdr;
    struct fuse_open_in     open;
} FUSE_OPEN_IN, *PFUSE_OPEN_IN;

typedef struct _FUSE_OPEN_OUT {
    struct fuse_out_header   hdr;
    struct fuse_open_out     open;
} FUSE_OPEN_OUT, *PFUSE_OPEN_OUT;

typedef struct _FUSE_READ_IN {
    struct fuse_in_header   hdr;
    struct fuse_read_in     read;
} FUSE_READ_IN, *PFUSE_READ_IN;

typedef struct _FUSE_RELEASE_IN {
    struct fuse_in_header   hdr;
    struct fuse_release_in  release;
} FUSE_RELEASE_IN, *PFUSE_RELEASE_IN;

typedef struct _FUSE_WRITE_IN {
    struct fuse_in_header   hdr;
    struct fuse_write_in    write;
} FUSE_WRITE_IN, * PFUSE_WRITE_IN;

typedef struct _FUSE_WRITE_OUT {
    struct fuse_out_header  hdr;
    struct fuse_write_out   write;
} FUSE_WRITE_OUT, * PFUSE_WRITE_OUT;

typedef struct _FUSE_FLUSH_IN {
    struct fuse_in_header   hdr;
    struct fuse_flush_in    flush;
} FUSE_FLUSH_IN, *PFUSE_FLUSH_IN;

typedef struct _FUSE_RENAME_IN {
    struct fuse_in_header   hdr;
    struct fuse_rename_in   rename;
} FUSE_RENAME_IN, *PFUSE_RENAME_IN;

typedef struct _FUSE_RENAME2_IN {
    struct fuse_in_header   hdr;
    struct fuse_rename2_in  rename;
} FUSE_RENAME2_IN, *PFUSE_RENAME2_IN;

typedef struct _FUSE_MKDIR_IN {
    struct fuse_in_header   hdr;
    struct fuse_mkdir_in    mkdir;
} FUSE_MKDIR_IN, *PFUSE_MKDIR_IN;

typedef struct _FUSE_MKDIR_OUT {
    struct fuse_out_header  hdr;
    struct fuse_entry_out   entry;
} FUSE_MKDIR_OUT, *PFUSE_MKDIR_OUT;

typedef struct _FUSE_FALLOCATE_IN {
    struct fuse_in_header       hdr;
    struct fuse_fallocate_in    falloc;
} FUSE_FALLOCATE_IN, *PFUSE_FALLOCATE_IN;

typedef struct _FUSE_SYMLINK_OUT {
    struct fuse_out_header  hdr;
    struct fuse_entry_out   entry;
} FUSE_SYMLINK_OUT, *PFUSE_SYMLINK_OUT;

typedef struct _FUSE_FORGET_IN {
    struct fuse_in_header   hdr;
    struct fuse_forget_in   forget;
} FUSE_FORGET_IN, *PFUSE_FORGET_IN;
